/* 
 * File:   Chrono.cpp
 * Author: amouro-m
 * 
 * Created on 30 mai 2010, 13:46
 */

#include "ResultPanel.h"

#include <QVBoxLayout>

ResultPanel::ResultPanel(QWidget *parent):
QWidget(parent)
{
    _qLabel = new QLabel("Journal", parent, 0);
    _qListWidget = new QListWidget(parent);

    QVBoxLayout* layout = new QVBoxLayout;
    layout->addWidget(_qLabel);
    layout->addWidget(_qListWidget);
    setLayout(layout);
}

ResultPanel::~ResultPanel() {}

void
ResultPanel::add_item(const char* str)
{
    _qListWidget->addItem(*new QString(str));
}

void
ResultPanel::reset()
{
    while(_qListWidget->count() > 0)
        _qListWidget->takeItem(0);
}